"""
@Time : 2021/9/14 19:47 
@Author : 常雷
@File : t_10数据转换.py 
@Software: PyCharm
"""
# 如何实现"1,2,3"变成["1","2","3"]
# 如何实现["1","2","3"]变成[1, 2, 3]

s = "1,2,3"
# split() 字符串切割
lst = s.split(",")
print(lst)

# 列表推导式完成第二问
lst2 = [int(i) for i in lst]
print(lst2)